package com.project.bean;

import java.time.LocalDate;

/**
 * 回贴实体类
 */
public class ReplyBean {
    /**回贴ID*/
    private int id;
    /**内容*/
    private String content;
    /**回贴时间*/
    private LocalDate createDate = LocalDate.now();
    /**回贴人*/
    private UserBean user;
    /**所属主贴*/
    private PrimaryPostBean primary;

    public ReplyBean() {
    }

    public ReplyBean(String content,int userId, int primaryId) {
        this.content = content;
        this.user = new UserBean();
        this.user.setId(userId);
        this.primary = new PrimaryPostBean();
        this.primary.setId(primaryId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDate getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDate createDate) {
        this.createDate = createDate;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public PrimaryPostBean getPrimary() {
        return primary;
    }

    public void setPrimary(PrimaryPostBean primary) {
        this.primary = primary;
    }

    @Override
    public String toString() {
        return "ReplyBean{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", createDate=" + createDate +
                ", user=" + user +
                ", primary=" + primary +
                '}';
    }
}
